<!DOCTYPE html>
<html>
  <head>
    <link rel="canonical" href="http://blog.csdn.net/hbuxiaoshe/article/details/44780653"/> 
    <script type="text/javascript">
        var username = "hbuxiaoshe";
        var _blogger = username;
        var blog_address = "http://blog.csdn.net/hbuxiaoshe";
        var static_host = "http://csdnimg.cn/release/phoenix/";
        var currentUserName = ""; 
        var fileName = '44780653';
        var commentscount = 2;
        var islock = false;
        window.quickReplyflag = true;
        var totalFloor = 2;
        var isBole = false;
        var isDigg = false;
        var isExpert = false;
        var isAdm = false;
        var baiduKey = "%E7%99%BE%E5%BA%A6%E5%9B%BE%E7%89%87objurl";
        var needInsertBaidu = false;
        var isShowAds = true;
    </script>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <script src="http://c.csdnimg.cn/public/common/libs/jquery/jquery-1.9.1.min.js" type="text/javascript"></script>
    <link rel="stylesheet" href="http://c.csdnimg.cn/public/static/css/avatar.css">
                <link rel="stylesheet" href="http://csdnimg.cn/release/phoenix/production/main-ffb45d8453.css">
          <link rel="stylesheet" href="http://c.csdnimg.cn/public/common/toolbar/content_toolbar_css/content_toolbar.css">

    <script src="http://csdnimg.cn/rabbit/exposure-click/main-1.0.5.js"></script>
    <script type="text/javascript" src="http://csdnimg.cn/pubfooter/js/tracking-1.0.2.js" charset="utf-8"></script>
    <script type="text/javascript" src="http://csdnimg.cn/release/phoenix/production/main-df0973cd7f.js"></script>

    <script src="http://dup.baidustatic.com/js/ds.js"></script>
    <script type="text/javascript">
        // Traffic Stats of the entire Web site By baidu
        var _hmt = _hmt || [];
        (function() {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?6bcd52f51e9b3dce32bec4a3997715ac";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
        // Traffic Stats of the entire Web site By baidu end
    </script>
    <meta name="description" content="使用query词抓取百度图片数据的时候，为了简化抓取，使用firebug跟踪到百度图片请求返回了一个json格式数据，例如http://image.baidu.com/i?tn=resultjson_com&amp;ie=gbk&amp;word=%B7%B6%B1%F9%B1%F9&amp;cg=girl&amp;pn=0&amp;rn=60（该url已简化）。我们只需抓取这个json数据即可，但是这个json格式中的objectUr" />
    <meta name="keywords" content="" />
    <meta http-equiv="Cache-Control" content="no-siteapp" /><link rel="alternate" media="handheld" href="#" />
    <meta name="shenma-site-verification" content="5a59773ab8077d4a62bf469ab966a63b_1497598848">
    <title>百度图片url解码 - CSDN博客</title>
    <link href="http://csdnimg.cn/public/favicon.ico" rel="SHORTCUT ICON">
              <script src="//csdnimg.cn/search/baidu_search-1.0.0.js?v=201802021047&autorun=true&install=true&keyword=%E7%99%BE%E5%BA%A6%E5%9B%BE%E7%89%87objurl"  type="text/javascript"></script>
      </head>
<body>
<script id="toolbar-tpl-scriptId" prod="download" skin="black" src="http://c.csdnimg.cn/public/common/toolbar/js/content_toolbar.js" type="text/javascript" domain="http://blog.csdn.net/"></script>
<div class="container clearfix">
  <main>
      <div style="display:none;">
          <img src="" onerror='setTimeout(function(){if(top !== self){window["\x74\x6f\x70"]["\x6c\x6f\x63\x61\x74\x69\x6f\x6e"]["\x68\x72\x65\x66"] = window["\x6c\x6f\x63\x61\x74\x69\x6f\x6e"]["\x68\x72\x65\x66"];}            if(typeof(csdn)=="\x75\x6e\x64\x65\x66\x69\x6e\x65\x64"&&window["\x6c\x6f\x63\x61\x74\x69\x6f\x6e"]["\x68\x6f\x73\x74"]["\x69\x6e\x64\x65\x78\x4f\x66"]("\x63\x73\x64\x6e\x2e\x6e\x65\x74")<0&&window["\x6c\x6f\x63\x61\x74\x69\x6f\x6e"]["\x68\x6f\x73\x74"]["\x69\x6e\x64\x65\x78\x4f\x66"]("\x69\x74\x65\x79\x65\x2e\x63\x6f\x6d")<0){window["\x6c\x6f\x63\x61\x74\x69\x6f\x6e"]["\x68\x72\x65\x66"]="\x68\x74\x74\x70\x73\x3a\x2f\x2f\x77\x77\x77\x2e\x63\x73\x64\x6e\x2e\x6e\x65\x74";}},3000);'>
      </div>
    <article>
        <h1 class="csdn_top">百度图片url解码</h1>
        <div class="article_bar clearfix">
            <div class="artical_tag">
                <span class="original">
                原创                </span>
                <span class="time">2015年03月31日 16:15:41</span>
            </div>

            <ul class="article_tags clearfix csdn-tracking-statistics tracking-click" data-mod="popu_377" >
                <li class="tit">标签：</li>

<!--          [startarticletags]-->
                <!--          [endarticletags]-->
            </ul>
            <ul class="right_bar">
                <li><button class="btn-noborder"><i class="icon iconfont icon-read"></i><span class="txt">7250</span></button></li>
                <li class="edit">
                    <a class="btn-noborder" href="" >
                        <i class="icon iconfont icon-bianji"></i><span class="txt">编辑</span>
                    </a>
                </li>
                <li class="del">
                    <a class="btn-noborder" onclick="javascript:deleteArticle(fileName);return false;">
                        <i class="icon iconfont icon-shanchu"></i><span class="txt">删除</span>
                    </a>
                </li>
            </ul>
        </div>
        <div id="article_content" class="article_content csdn-tracking-statistics tracking-click" data-mod="popu_519" data-dsm="post">
                        
<p><span style="color:#CC0000;"><strong>使用query词抓取百度图片数据</strong></span>的时候，为了简化抓取，使用firebug跟踪到百度图片请求返回了一个json格式数据，例如<a href="http://image.baidu.com/i?tn=resultjson_com&amp;ie=gbk&amp;word=%B7%B6%B1%F9%B1%F9&amp;cg=girl&amp;pn=0&amp;rn=60">http://image.baidu.com/i?tn=resultjson_com&amp;ie=gbk&amp;word=%B7%B6%B1%F9%B1%F9&amp;cg=girl&amp;pn=0&amp;rn=60</a>（该url已简化）。我们只需抓取这个json数据即可，但是这个json格式中的objectUrl和fromUrl却是加密了的数据，如ippr_z2C$qAzdH3FAzdH3Fjgp_z&amp;e3Bvg6_z&amp;e3BvgAzdH3FstfpAzdH3Fda8candnAzdH3FWada8candnn98c9lndadl9_z&amp;e3B3r2。后又使用firebug发现，鼠标在点击连接时并没有向百度解密的请求，故判断解密程序在javascript中。</p>
<p>本来打算使用SpiderMonkey执行js来解密，但今天在网上偶然看到一段js解密url的代码，来自百度知道http://zhidao.baidu.com/link?url=APKpO_ktmLa4QE0ZYlOqKyNdLul4rkDbV-LXBeDv40sHe0yDXS-LGc4A3ArNL2RoSY4xD2Z8M_5vdmjm2nAOILhYWXE1ErtGMiPbi-paK4e，测试了下是对的，到这里这个问题总算搞定了。</p>
<p><span style="color:#CC0000;"><strong>解密方法很简单</strong></span>，秘钥是一个字符的对应关系，有2种映射：（1）多个字符映射为一个字符，'_z2C$q'=&gt;':','_z&amp;e3B'=&gt;'.','AzdH3F'=&gt;'/'，（2）单个字符映射为单字符。根据这个关系可将密文解密为明文，实现并不困难。</p>
<p><span style="color:#3366FF;"><strong>C语言的实现</strong></span>：</p>
<p></p><pre class="cpp">#include &lt;stdio.h&gt;
#include &lt;string.h&gt;

// return length;
int Decode(const char *src, const char *table, char *dest) {
  char *d = dest;
  const char *p = src;
  while (*p != 0) {
    if (*p == '_') {
      if (strncmp(p, "_z2C$q", 6) == 0) {
        *dest++ = ':';
        p += 6;
      } else if (strncmp(p, "_z&amp;e3B", 6) == 0) {
        *dest++ = '.';
        p += 6;
      } else {
        *dest++ = *p++;
      }
    } else if (*p == 'A') {
      if (strncmp(p, "AzdH3F", 6) == 0) {
        *dest++ = '/';
        p += 6;
      } else {
        *dest++ = *p++;
      }
    } else if (table[*p] == 0) {
      *dest++ = *p++;
    } else {
      *dest++ = table[*p++];
    }
  }
  *dest = 0;
  return dest - d;
}

int main(int argc, char **argv) {
  static char table[128] = {0};
  table['w'] = 'a';
  table['k'] = 'b';
  table['v'] = 'c';
  table['1'] = 'd';
  table['j'] = 'e';
  table['u'] = 'f';
  table['2'] = 'g';
  table['i'] = 'h';
  table['t'] = 'i';
  table['3'] = 'j';
  table['h'] = 'k';
  table['s'] = 'l';
  table['4'] = 'm';
  table['g'] = 'n';
  table['5'] = 'o';
  table['r'] = 'p';
  table['q'] = 'q';
  table['6'] = 'r';
  table['f'] = 's';
  table['p'] = 't';
  table['7'] = 'u';
  table['e'] = 'v';
  table['o'] = 'w';
  table['8'] = '1';
  table['d'] = '2';
  table['n'] = '3';
  table['9'] = '4';
  table['c'] = '5';
  table['m'] = '6';
  table['0'] = '7';
  table['b'] = '8';
  table['l'] = '9';
  table['a'] = '0';

  char *url = "ippr_z2C$qAzdH3FAzdH3Ft428_z&amp;e3Bd0_z&amp;e3BvgAzdH3Ft4w2jfAzdH3Fda8a8aAzdH3FddAzdH3F8db00d0dnd_9amln8aa_z&amp;e3B3r2";
  char dest[1024];
  Decode(url, table, dest);
  printf("%s\n", dest);
  return 0;
}
</pre><span style="color:#3366FF;">自己写的，不能保证效率。</span>
<p>输出：http://img1.27.cn/images/201010/22/1287727232_40693100.jpg<br /><br /></p>
<p><span style="color:#3366FF;"><strong>JavaScript的实现</strong></span>：</p>
<p></p><pre class="javascript">&lt;script type="text/javascript"&gt;
  var f = {   w: "a",   k: "b",   v: "c",   1: "d",   j: "e",   u: "f",   2: "g",   i: "h",   t: "i",   3: "j",   h: "k",   s: "l",   4: "m",   g: "n",   5: "o",   r: "p",   q: "q",   6: "r",   f: "s",   p: "t",   7: "u",   e: "v",   o: "w",   8: "1",   d: "2",   n: "3",   9: "4",   c: "5",   m: "6",   0: "7",   b: "8",   l: "9",   a: "0",   _z2C$q: ":",   "_z&amp;e3B": ".",   AzdH3F: "/"   };

  var url = "ippr_z2C$qAzdH3FAzdH3Fjgp_z&amp;e3Bvg6_z&amp;e3BvgAzdH3FstfpAzdH3Fda8candnAzdH3FWada8candnn98c9lndadl9_z&amp;e3B3r2";

  var h = /(_z2C\$q|_z&amp;e3B|AzdH3F)/g;
  var e = url.replace(h, function(t, e) { return f[e] });
  
  var s = /([a-w\d])/g;
  e = e.replace(s, function(t, e) { return f[e] });
  document.write(e);
&lt;/script&gt;</pre><br />
输出：http://ent.cnr.cn/list/20150323/W020150323341549320294.jpg
<p><br /></p>
<p><span style="color:#3366FF;"><strong>PHP的实现</strong></span>：</p>
<p></p><pre class="php">&lt;?PHP
$f = array('w'=&gt;'a','k'=&gt;'b','v'=&gt;'c','1'=&gt;'d','j'=&gt;'e','u'=&gt;'f','2'=&gt;'g','i'=&gt;'h','t'=&gt;'i','3'=&gt;'j','h'=&gt;'k','s'=&gt;'l','4'=&gt;'m','g'=&gt;'n','5'=&gt;'o','r'=&gt;'p','q'=&gt;'q','6'=&gt;'r','f'=&gt;'s','p'=&gt;'t','7'=&gt;'u','e'=&gt;'v','o'=&gt;'w','8'=&gt;'1','d'=&gt;'2','n'=&gt;'3','9'=&gt;'4','c'=&gt;'5','m'=&gt;'6','0'=&gt;'7','b'=&gt;'8','l'=&gt;'9','a'=&gt;'0','_z2C$q'=&gt;':','_z&amp;e3B'=&gt;'.','AzdH3F'=&gt;'/');
 
$url = 'ippr_z2C$qAzdH3FAzdH3Ft4f_z&amp;e3Bw6ptg2nmc_z&amp;e3Bv54AzdH3Fg51jAzdH3F8da90bAzdH3F'; // 这里需要用单引号

$url = preg_replace_callback('/_z2C\$q|_z&amp;e3B|AzdH3F/', function($matches){ global $f; return $f[$matches[0]]; }, $url); 
$url = preg_replace_callback('/[a-w\d]/', function($matches){ global $f; return $f[$matches[0]]; }, $url); 
echo $url;
?&gt;</pre><br />                    </div>
    </article>
      <div class="readall_box csdn-tracking-statistics tracking-click" data-mod="popu_376">
          <div class="read_more_mask"></div>
          <a class="btn btn-large btn-gray-fred read_more_btn" target="_self">阅读全文</a>
      </div>
      <div class="article_copyright">
              </div>
      <ul class="article_collect clearfix csdn-tracking-statistics tracking-click"  data-mod="popu_378">
          <li class="tit">本文已收录于以下专栏：</li>
<!--          [startarticlecolumns]-->
                                <!--          [endarticlecolumns]-->
      </ul>
      <div class="comment_box clearfix" id="comments">
          <div id="comment_form">
              <div id="commentsbmitarear">
                              </div>
          </div>
      </div>
      <div class="comment_li_outbox">
          <div id="comment_list"></div>
      </div>

      <div class="more_comment">
          <div id="comment_bar" class="trackgin-ad" data-mod="popu_385"></div>
      </div>

      <!-- <h3 class="recommend_tit" id="related">相关文章推荐</h3> -->
      <div class="recommend_list clearfix" id="rasss">
                                                                        <dl class="clearfix csdn-tracking-statistics recommend_article" data-mod="popu_387" data-poputype="feed"  data-feed-show="false"  data-dsm="post">
                      <a href="http://blog.csdn.net/u012557538/article/details/78838956"  target="_blank" strategy="BlogCommendFromBaidu_0">
                        <dd class="clearfix">
                          <h2 class="">接口返回图片</h2>
                          <div class="summary">
                              场景：第三方需要取图片还有一些文件信息，需要这边制作一个接口服务返回数据。文件服务器、接口服务、第三方的应用（简称应用）都部署在内网，但应用因为通过一系列的网络处理，是可以外网访问的。接口服务和文件服...                          </div>

                          <ul class="">
                              <li class="avatar_img"><img src="http://avatar.csdn.net/A/6/E/3_u012557538.jpg" alt="u012557538" title="u012557538"/></li>
                              <li class="user_name">u012557538</li>
                              <li class="time">2017年12月19日 10:10</li>
                              <li class="visited_num"><i class="icon iconfont icon-read"></i><span>252</span></li>
                          </ul>
                        </dd>
                      </a>
                  </dl>
                                                                                      <dl class="clearfix csdn-tracking-statistics recommend_article" data-mod="popu_387" data-poputype="feed"  data-feed-show="false"  data-dsm="post">
                      <a href="http://blog.csdn.net/Haohappy2004/article/details/491895"  target="_blank" strategy="BlogCommendFromBaidu_1">
                        <dd class="clearfix">
                          <h2 class="">一个解析URL及图片地址的JS函数</h2>
                          <div class="summary">
                              为BBS增加的解析函数，不知道有没有更好的方法，没看其它BBS的JS代码：BBS function prints(str) {var matchPIC = new RegExp("((?:http|h...                          </div>

                          <ul class="">
                              <li class="avatar_img"><img src="http://avatar.csdn.net/D/1/B/3_haohappy2004.jpg" alt="Haohappy2004" title="Haohappy2004"/></li>
                              <li class="user_name">Haohappy2004</li>
                              <li class="time">2005年09月29日 10:26</li>
                              <li class="visited_num"><i class="icon iconfont icon-read"></i><span>2495</span></li>
                          </ul>
                        </dd>
                      </a>
                  </dl>
                                                                      <dl class="">
                  <script>
                  (function() {
                    var s = "_" + Math.random().toString(36).slice(2);
                    document.write('<div id="' + s + '"></div>');
                    (window.slotbydup=window.slotbydup || []).push({
                      id: '4765209',
                      container: s,
                      size: '808,120',
                      display: 'inlay-fix'
                    });
                  })();
                  </script>
                </dl>
                                                                <dl class="clearfix csdn-tracking-statistics recommend_article" data-mod="popu_387" data-poputype="feed"  data-feed-show="false"  data-dsm="post">
                      <a href="http://blog.csdn.net/peter_qyq/article/details/52035162"  target="_blank" strategy="searchFromBaidu_2">
                        <dd class="clearfix">
                          <h2 class="">微信JSSDK开发（分享接口和上传图片接口）</h2>
                          <div class="summary">
                              JSSDK使用步骤
1：绑定域名
先登录微信公众平台进入“公众号设置”的“功能设置”里填写“JS接口安全域名”。如果你使用了支付类接口，请确保支付目录在该安全域名下，否则将无法完成支付。
备注：登录后...                          </div>

                          <ul class="">
                              <li class="avatar_img"><img src="http://avatar.csdn.net/1/2/8/3_peter_qyq.jpg" alt="peter_qyq" title="peter_qyq"/></li>
                              <li class="user_name">peter_qyq</li>
                              <li class="time">2016年07月26日 13:58</li>
                              <li class="visited_num"><i class="icon iconfont icon-read"></i><span>7052</span></li>
                          </ul>
                        </dd>
                      </a>
                  </dl>
                                                                                      <dl class="clearfix csdn-tracking-statistics downloadElement" data-mod="popu_387" data-poputype="feed"  data-feed-show="false"  data-dsm="post">
                      <a class="clearfix" href="http://download.csdn.net/download/tengmuxin/6359739" target="_blank" strategy="searchFromBaidu_3">
                        <dd class="floatL">
                            <div class="summary">
                                <h2>微信url接口大全</h2>
                                <div class="summary">
                                    <ul>
                                        <li class="time">2013年10月06日 16:22</li>
                                        <li class="visited_num fileSize">57KB</li>
                                        <li class="download_btn">下载</li>
                                    </ul>
                                </div>
                            </div>
                        </dd>
                        <dt class="floatR"><img class="maxwidth" src="http://csdnimg.cn/release/download/old_static/images/minetype/doc.svg" alt="" title=""/></dt>
                      </a>
                  </dl>
                                                                                      <dl class="clearfix csdn-tracking-statistics recommend_article" data-mod="popu_387" data-poputype="feed"  data-feed-show="false"  data-dsm="post">
                      <a href="http://blog.csdn.net/zhangjiaming8889/article/details/40976445"  target="_blank" strategy="BlogCommendFromBaidu_4">
                        <dd class="clearfix">
                          <h2 class="">通过url联网获取图片并解析</h2>
                          <div class="summary">
                              public static Bitmap getResponsebitmap(String urlPath) {
		URL url;
		Bitmap map = null;
		try {
			...                          </div>

                          <ul class="">
                              <li class="avatar_img"><img src="http://avatar.csdn.net/5/D/6/3_zhangjiaming8889.jpg" alt="zhangjiaming8889" title="zhangjiaming8889"/></li>
                              <li class="user_name">zhangjiaming8889</li>
                              <li class="time">2014年11月10日 09:27</li>
                              <li class="visited_num"><i class="icon iconfont icon-read"></i><span>784</span></li>
                          </ul>
                        </dd>
                      </a>
                  </dl>
                                                                                      <dl class="clearfix csdn-tracking-statistics recommend_article" data-mod="popu_387" data-poputype="feed"  data-feed-show="false"  data-dsm="post">
                      <a href="http://blog.csdn.net/asijack/article/details/52996315"  target="_blank" strategy="BlogCommendFromBaidu_5">
                        <dd class="clearfix">
                          <h2 class="">解密加密的URL图片数据</h2>
                          <div class="summary">
                              public void decryptData(String alarmId,String picUrlPath, String password, @NonNull DecryptPictureCa...                          </div>

                          <ul class="">
                              <li class="avatar_img"><img src="http://avatar.csdn.net/D/D/9/3_asijack.jpg" alt="asijack" title="asijack"/></li>
                              <li class="user_name">asijack</li>
                              <li class="time">2016年11月01日 15:23</li>
                              <li class="visited_num"><i class="icon iconfont icon-read"></i><span>491</span></li>
                          </ul>
                        </dd>
                      </a>
                  </dl>
                                                                                      <dl class="clearfix csdn-tracking-statistics recommend_article" data-mod="popu_387" data-poputype="feed"  data-feed-show="false"  data-dsm="post">
                      <a href="http://blog.csdn.net/jj546630576/article/details/76714199"  target="_blank" strategy="searchFromBaidu_6">
                        <dd class="clearfix">
                          <h2 class="">爬虫接口数据抓去，下载图片</h2>
                          <div class="summary">
                              # -*- encoding = utf-8 -*-

import requests
from urllib.parse import quote
import threading
threadin...                          </div>

                          <ul class="">
                              <li class="avatar_img"><img src="http://avatar.csdn.net/8/2/2/3_jj546630576.jpg" alt="jj546630576" title="jj546630576"/></li>
                              <li class="user_name">jj546630576</li>
                              <li class="time">2017年08月05日 12:24</li>
                              <li class="visited_num"><i class="icon iconfont icon-read"></i><span>131</span></li>
                          </ul>
                        </dd>
                      </a>
                  </dl>
                                                                                      <dl class="clearfix csdn-tracking-statistics recommend_article" data-mod="popu_387" data-poputype="feed"  data-feed-show="false"  data-dsm="post">
                      <a href="http://blog.csdn.net/petrel_zhu/article/details/50756129"  target="_blank" strategy="searchFromBaidu_7">
                        <dd class="clearfix">
                          <h2 class="">调用微信接口上传图片总结</h2>
                          <div class="summary">
                              最开始实现图片上传用的是插件来实现的。用这种方法在pc以及苹果的平台上可以很好的兼容，但是在android上各种机型的兼容性各有差异，总体上看兼容性很差。因为小小创客是属于移动端微信开发的一部分，如果...                          </div>

                          <ul class="">
                              <li class="avatar_img"><img src="http://avatar.csdn.net/7/A/D/3_petrel_zhu.jpg" alt="petrel_zhu" title="petrel_zhu"/></li>
                              <li class="user_name">petrel_zhu</li>
                              <li class="time">2016年02月27日 17:49</li>
                              <li class="visited_num"><i class="icon iconfont icon-read"></i><span>10846</span></li>
                          </ul>
                        </dd>
                      </a>
                  </dl>
                                                                                      <dl class="clearfix csdn-tracking-statistics recommend_article" data-mod="popu_387" data-poputype="feed"  data-feed-show="false"  data-dsm="post">
                      <a href="http://blog.csdn.net/yuwang_00/article/details/51063060"  target="_blank" strategy="BlogCommendFromBaidu_8">
                        <dd class="clearfix">
                          <h2 class="">实现自己的ImageLoader（3）-----网络拉取图片与key的加密</h2>
                          <div class="summary">
                              简要叙述MessageDisgest用法以及如何拉取网络图片                          </div>

                          <ul class="">
                              <li class="avatar_img"><img src="http://avatar.csdn.net/3/6/5/3_yuwang_00.jpg" alt="yuwang_00" title="yuwang_00"/></li>
                              <li class="user_name">yuwang_00</li>
                              <li class="time">2016年04月05日 10:52</li>
                              <li class="visited_num"><i class="icon iconfont icon-read"></i><span>507</span></li>
                          </ul>
                        </dd>
                      </a>
                  </dl>
                                                                                      <dl class="clearfix csdn-tracking-statistics recommend_article" data-mod="popu_387" data-poputype="feed"  data-feed-show="false"  data-dsm="post">
                      <a href="http://blog.csdn.net/chinajobs/article/details/53044359"  target="_blank" strategy="BlogCommendFromBaidu_9">
                        <dd class="clearfix">
                          <h2 class="">百度搜索URL参数你知道多少</h2>
                          <div class="summary">
                              http://www.baidu.com/s?wd=关键字 

wd(Keyword)：查询的关键词；

http://www.baidu.com/s?wd=关键字&cl=3 

cl(C...                          </div>

                          <ul class="">
                              <li class="avatar_img"><img src="http://avatar.csdn.net/0/A/0/3_chinajobs.jpg" alt="chinajobs" title="chinajobs"/></li>
                              <li class="user_name">chinajobs</li>
                              <li class="time">2016年11月05日 11:29</li>
                              <li class="visited_num"><i class="icon iconfont icon-read"></i><span>720</span></li>
                          </ul>
                        </dd>
                      </a>
                  </dl>
                                                    <!-- <script async="async" charset="utf-8" src="https://shared.ydstatic.com/js/yatdk/3.0.0/stream.js" data-notify="bannerMulti_notify" data-insert-nodes="yd_a_d_feed_1,yd_a_d_feed_13,yd_a_d_feed_18,yd_a_d_feed_23,yd_a_d_feed_28,yd_a_d_feed_33" data-id="8935aa488dd58452b9e5ee3b44f1212f" data-hide-ad-label="0" data-div-Style="width:100%;padding:16px 35px 16px 10px;" data-img-Style="float:right;width:120px;" data-tit-Style="font-size:20px;font-weight:bold;margin-bottom:10px;font-family: 'PingFang SC', 'Microsoft YaHei', SimHei, Arial, SimSun;" data-des-Style="width:700px;font-size:14px;font-family: 'PingFang SC', 'Microsoft YaHei', SimHei, Arial, SimSun;" > </script> -->
      
      </div>
  </main>
<aside>
    <div class="right_box user_info">
    <dl class="inf_bar clearfix">
        <dt class="csdn-tracking-statistics tracking-click" data-mod="popu_381">
        <a href="http://blog.csdn.net/hbuxiaoshe" target="_blank">
            <img src="http://avatar.csdn.net/2/6/4/3_hbuxiaoshe.jpg" class="avatar_pic">
        </a>
      </dt><dd>
            <h3 class="csdn-tracking-statistics tracking-click"  data-mod="popu_380"><a href="http://blog.csdn.net/hbuxiaoshe" target="_blank" id="uid">hbuxiaoshe</a></h3>
            <div class="medals" title="">
                      </div>
                        <span  class="csdn-tracking-statistics tracking-click" data-mod="popu_379"><a class="btn btn-redborder-small "  id="span_add_follow" target="_self">关注</a></span>
                    </dd>
    </dl>
    <div class="inf_number_box clearfix">
        <dl title="124">
            <dt>原创</dt>
            <dd>124</dd>
        </dl>
        <dl title="83">
            <dt>粉丝</dt>
            <dd id='fan'>83</dd>
        </dl>
        <dl title="2">
            <dt>喜欢</dt>
            <dd>2</dd>
        </dl>
        <dl title="89">
          <dt>评论</dt>
          <dd>89</dd>
        </dl>
    </div>

</div>
<div class="interflow clearfix">
      <div class="grade gradeAndbadge">
      <span>等级：</span>
      <div>
        <a href="http://blog.csdn.net/home/help.html#level" title="6级,点击查看等级说明" target="_blank">
          <img class="grade-img" src="http://c.csdnimg.cn/jifen/images/xunzhang/jianzhang/blog6.png" alt="6级,点击查看等级说明">
        </a>
      </div>
    </div>
    <div class="gradeAndbadge" title="442802">
        <span>访问量：</span>
        <span class="num odd-overhidden">442.8K</span>
    </div>

    <div class="gradeAndbadge" title="5809">
      <span>积分：</span>
      <span  class="num odd-overhidden">5.8K</span>
    </div>
    <div class="gradeAndbadge" title="5221">
        <span>排名：</span>
        <span class="num odd-overhidden">5.22K</span>
    </div>

</div>          <div class="extension_other csdn-tracking-statistics tracking-click" data-mod="popu_389">
          <!--u3032528-->
        <div class="flashrecommend">
            <script type="text/javascript" src="//cee1.iteye.com/bwocoltly.js"></script>
        </div>
      </div>
      <div class="writings">
    <div class="public_signal clearfix">
      <h3>他的最新文章</h3>
      <a href="http://blog.csdn.net/hbuxiaoshe" target="_blank" class="more"><span>更多文章</span></a>
    </div>
      <ul class="inf_list clearfix csdn-tracking-statistics tracking-click" data-mod="popu_382">
                    <li class="clearfix">
              <a href="http://blog.csdn.net/hbuxiaoshe/article/details/51988892" target="_blank">linux64位使用phantomjs获取页面截图</a>
          </li>
                    <li class="clearfix">
              <a href="http://blog.csdn.net/hbuxiaoshe/article/details/47272957" target="_blank">mysql_real_connect连接问题</a>
          </li>
                    <li class="clearfix">
              <a href="http://blog.csdn.net/hbuxiaoshe/article/details/46981917" target="_blank">leveldb使用时遇到的性能问题</a>
          </li>
                    <li class="clearfix">
              <a href="http://blog.csdn.net/hbuxiaoshe/article/details/46980907" target="_blank">不用＋、－、×、÷做加法</a>
          </li>
                    <li class="clearfix">
              <a href="http://blog.csdn.net/hbuxiaoshe/article/details/46006299" target="_blank">加载plist播放特效</a>
          </li>
                </ul>
  </div>
            <div class="user-hotArticle sort userSort">
            <h3>文章分类</h3>
            <ul class="hotArticle-list userSort-list">
                                    <li class="clearfix">
                        <a href="http://blog.csdn.net/hbuxiaoshe/article/category/672882" class="odd-overhidden floatL">C/C++</a>
                        <div class="read list-left floatR"><span>46篇</span></div>
                    </li>
                                    <li class="clearfix">
                        <a href="http://blog.csdn.net/hbuxiaoshe/article/category/619445" class="odd-overhidden floatL">linux/shell</a>
                        <div class="read list-left floatR"><span>12篇</span></div>
                    </li>
                                    <li class="clearfix">
                        <a href="http://blog.csdn.net/hbuxiaoshe/article/category/657635" class="odd-overhidden floatL">Flash</a>
                        <div class="read list-left floatR"><span>12篇</span></div>
                    </li>
                                    <li class="clearfix">
                        <a href="http://blog.csdn.net/hbuxiaoshe/article/category/733387" class="odd-overhidden floatL">linux下C语言编程</a>
                        <div class="read list-left floatR"><span>12篇</span></div>
                    </li>
                                    <li class="clearfix">
                        <a href="http://blog.csdn.net/hbuxiaoshe/article/category/835561" class="odd-overhidden floatL">thrift</a>
                        <div class="read list-left floatR"><span>10篇</span></div>
                    </li>
                                    <li class="clearfix">
                        <a href="http://blog.csdn.net/hbuxiaoshe/article/category/743410" class="odd-overhidden floatL">C语言平面几何</a>
                        <div class="read list-left floatR"><span>19篇</span></div>
                    </li>
                                    <li class="clearfix">
                        <a href="http://blog.csdn.net/hbuxiaoshe/article/category/632342" class="odd-overhidden floatL">OpenGL</a>
                        <div class="read list-left floatR"><span>11篇</span></div>
                    </li>
                                    <li class="clearfix">
                        <a href="http://blog.csdn.net/hbuxiaoshe/article/category/617699" class="odd-overhidden floatL">postgres</a>
                        <div class="read list-left floatR"><span>1篇</span></div>
                    </li>
                                    <li class="clearfix">
                        <a href="http://blog.csdn.net/hbuxiaoshe/article/category/6324032" class="odd-overhidden floatL">spider</a>
                        <div class="read list-left floatR"><span>1篇</span></div>
                    </li>
                            </ul>
            <div class="unfold-btn">
              <span>展开</span><i class="icon iconfont icon-xiajiantou"></i>
            </div>
        </div>
    <!--    [StartShowSelfColumn]-->
    <!--    [EndShowSelfColumn]-->
            <div class="user-hotArticle sort timeSort">
          <h3>文章存档</h3>
          <ul class="hotArticle-list timeSort-list">
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/hbuxiaoshe/article/month/2016/07" class="odd-overhidden floatL">2016年7月</a>
                  <div class="read list-left floatR"><span>1篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/hbuxiaoshe/article/month/2015/08" class="odd-overhidden floatL">2015年8月</a>
                  <div class="read list-left floatR"><span>1篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/hbuxiaoshe/article/month/2015/07" class="odd-overhidden floatL">2015年7月</a>
                  <div class="read list-left floatR"><span>2篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/hbuxiaoshe/article/month/2015/05" class="odd-overhidden floatL">2015年5月</a>
                  <div class="read list-left floatR"><span>1篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/hbuxiaoshe/article/month/2015/04" class="odd-overhidden floatL">2015年4月</a>
                  <div class="read list-left floatR"><span>2篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/hbuxiaoshe/article/month/2015/03" class="odd-overhidden floatL">2015年3月</a>
                  <div class="read list-left floatR"><span>3篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/hbuxiaoshe/article/month/2014/10" class="odd-overhidden floatL">2014年10月</a>
                  <div class="read list-left floatR"><span>1篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/hbuxiaoshe/article/month/2014/08" class="odd-overhidden floatL">2014年8月</a>
                  <div class="read list-left floatR"><span>4篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/hbuxiaoshe/article/month/2014/07" class="odd-overhidden floatL">2014年7月</a>
                  <div class="read list-left floatR"><span>1篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/hbuxiaoshe/article/month/2014/04" class="odd-overhidden floatL">2014年4月</a>
                  <div class="read list-left floatR"><span>1篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/hbuxiaoshe/article/month/2014/03" class="odd-overhidden floatL">2014年3月</a>
                  <div class="read list-left floatR"><span>1篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/hbuxiaoshe/article/month/2013/12" class="odd-overhidden floatL">2013年12月</a>
                  <div class="read list-left floatR"><span>1篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/hbuxiaoshe/article/month/2013/05" class="odd-overhidden floatL">2013年5月</a>
                  <div class="read list-left floatR"><span>1篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/hbuxiaoshe/article/month/2013/04" class="odd-overhidden floatL">2013年4月</a>
                  <div class="read list-left floatR"><span>1篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/hbuxiaoshe/article/month/2013/03" class="odd-overhidden floatL">2013年3月</a>
                  <div class="read list-left floatR"><span>1篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/hbuxiaoshe/article/month/2013/01" class="odd-overhidden floatL">2013年1月</a>
                  <div class="read list-left floatR"><span>2篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/hbuxiaoshe/article/month/2011/07" class="odd-overhidden floatL">2011年7月</a>
                  <div class="read list-left floatR"><span>1篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/hbuxiaoshe/article/month/2011/06" class="odd-overhidden floatL">2011年6月</a>
                  <div class="read list-left floatR"><span>6篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/hbuxiaoshe/article/month/2011/01" class="odd-overhidden floatL">2011年1月</a>
                  <div class="read list-left floatR"><span>1篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/hbuxiaoshe/article/month/2010/12" class="odd-overhidden floatL">2010年12月</a>
                  <div class="read list-left floatR"><span>8篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/hbuxiaoshe/article/month/2010/11" class="odd-overhidden floatL">2010年11月</a>
                  <div class="read list-left floatR"><span>17篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/hbuxiaoshe/article/month/2010/10" class="odd-overhidden floatL">2010年10月</a>
                  <div class="read list-left floatR"><span>11篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/hbuxiaoshe/article/month/2010/09" class="odd-overhidden floatL">2010年9月</a>
                  <div class="read list-left floatR"><span>12篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/hbuxiaoshe/article/month/2010/08" class="odd-overhidden floatL">2010年8月</a>
                  <div class="read list-left floatR"><span>18篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/hbuxiaoshe/article/month/2010/07" class="odd-overhidden floatL">2010年7月</a>
                  <div class="read list-left floatR"><span>1篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/hbuxiaoshe/article/month/2010/04" class="odd-overhidden floatL">2010年4月</a>
                  <div class="read list-left floatR"><span>6篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/hbuxiaoshe/article/month/2010/03" class="odd-overhidden floatL">2010年3月</a>
                  <div class="read list-left floatR"><span>2篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/hbuxiaoshe/article/month/2010/01" class="odd-overhidden floatL">2010年1月</a>
                  <div class="read list-left floatR"><span>3篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/hbuxiaoshe/article/month/2009/12" class="odd-overhidden floatL">2009年12月</a>
                  <div class="read list-left floatR"><span>8篇</span></div>
                </li>
                            <li class="clearfix">
                  <a href="http://blog.csdn.net/hbuxiaoshe/article/month/2009/11" class="odd-overhidden floatL">2009年11月</a>
                  <div class="read list-left floatR"><span>7篇</span></div>
                </li>
                      </ul>
          <div class="unfold-btn">
            <span>展开</span><i class="icon iconfont icon-xiajiantou"></i>
          </div>
        </div>
        <div class="user-hotArticle">
        <h3>他的热门文章</h3>
        <ul class="hotArticle-list csdn-tracking-statistics tracking-click" data-mod="popu_521">
<!--            [StartHotArticles]-->
                                                <li>
                        <a href="http://blog.csdn.net/hbuxiaoshe/article/details/6558391">thrift一个例子</a>
                        <div class="read list-left"><i class="icon iconfont icon-read"></i><span>24219</span></div>
                    </li>
                                    <li>
                        <a href="http://blog.csdn.net/hbuxiaoshe/article/details/6074889">如何将C语言代码转换为对应的汇编代码？</a>
                        <div class="read list-left"><i class="icon iconfont icon-read"></i><span>22540</span></div>
                    </li>
                                    <li>
                        <a href="http://blog.csdn.net/hbuxiaoshe/article/details/5967773">double类型相等判断</a>
                        <div class="read list-left"><i class="icon iconfont icon-read"></i><span>16922</span></div>
                    </li>
                                    <li>
                        <a href="http://blog.csdn.net/hbuxiaoshe/article/details/6561914">fstatfs/statfs详解</a>
                        <div class="read list-left"><i class="icon iconfont icon-read"></i><span>16670</span></div>
                    </li>
                                    <li>
                        <a href="http://blog.csdn.net/hbuxiaoshe/article/details/6560285">thrift多线程服务端</a>
                        <div class="read list-left"><i class="icon iconfont icon-read"></i><span>14283</span></div>
                    </li>
                            <!--            [EndHotArticles]-->
        </ul>
    </div>

<!--    [startcustom]-->
    <!--    [endcustom]-->
  <div class="fixRight_box" style="height:256px">
    <div class="fixRight">
                    <!--u3163270-->
            <script type="text/javascript" src="//cee1.iteye.com/avneunkwb.js"></script>
                <div class="right_box copyright csdn-tracking-statistics" data-mod="popu_475" data-dsm="post">
        <h3 class="feed_new_tit"><span class="line"></span><span class="txt">联系我们</span></h3>
        <div class="contact-box">
            <div class="img-box">
                <img src="https://www.csdn.net/images/csdn_cs_qr.png" alt="客服">
            </div>
            <div class="contact-info">
                <h4>请扫描二维码联系客服</h4>
                <p>
                    <i class="icon iconfont icon-mail"></i>
                    <a href="mailto:webmaster@csdn.net" target="_blank">
                        <span class="txt">webmaster@csdn.net</span>
                    </a>
                </p>
                <p>
                    <i class="icon iconfont icon-call"></i>
                    <span class="txt">400-660-0108</span>
                </p>
                <p>
                    <i class="icon iconfont icon-QQ"></i>
                    <a href="http://wpa.qq.com/msgrd?v=3&amp;uin=2431299880&amp;site=qq&amp;menu=yes" target="_blank">
                        <span class="txt">网站客服</span>
                    </a>
                </p>
            </div>
        </div>
        <div class="bg-gray">
            <div class="feed_copyright">
                <p><a class="right-dotte" href="//www.csdn.net/company/about.html" target="_blank">关于</a><a href="//www.csdn.net/company/recruit.html" target="_blank" class="right-dotte">招聘</a><a href="//www.csdn.net/company/marketing.html" target="_blank" class="right-dotte">广告服务</a><img src="https://www.csdn.net/images/ali01.png" alt="ali" title="ali"></p>
                <p class="fz12">©2018 CSDN <a href="http://www.miibeian.gov.cn/" target="_blank" class="ml14">京ICP证09002463号</a></p>
            </div>
            <div class="allow-info-box">
                <p><a href="http://www.hd315.gov.cn/beian/view.asp?bianhao=010202001032100010" target="_blank"><span>经营性网站备案信息</span></a></p>
                <p><a href="http://www.cyberpolice.cn/" target="_blank"><span>网络110报警服务</span></a></p>
                <p><a href="http://www.12377.cn/" target="_blank"><span>中国互联网举报中心</span></a></p>
                <p><a href="http://www.bjjubao.org/" target="_blank"><span>北京互联网违法和不良信息举报中心</span></a></p>
            </div>
        </div>
    </div>
    </div>
  </div>
</aside></div>

<div class="left_fixed">
    <div class="left_show_button">
        <span>
          <i class="icon iconfont icon-youjiantou"></i>
        </span>
    </div>
    <ul class="left_menu" id="share_box">
        <li>
            <button class="left-fixed-btn btn-like csdn-tracking-statistics tracking-click" data-mod="popu_373" target="_self" title="点赞">
                <a href="javascript:void(0);" class="iconbox border_red" ><i class="icon iconfont icon-dianzan"></i></a>
                <a class="txt" href="javascript:void(0);">3</a>
            </button>
        </li>
        <li id="blog_artical_directory">
            <button class="left-fixed-btn left_menu_btn csdn-tracking-statistics tracking-click" data-mod="popu_372" target="_self" title="目录">
                <a href="javascript:void(0);" class="iconbox border_black" ><i class="icon iconfont icon-mulu"></i></a>
            </button>
        </li>
        <li class="menu_con">
            <div class="list_father">
                <div class="arr_box">
                    <button class="btn-noborder arr-btn scroll-down  left_scroll_down"><i class="icon iconfont icon-xiajiantou"></i></button>
                    <button class="btn-noborder arr-btn scroll-up left_scroll_top"><i class="icon iconfont icon-shangjiantou"></i></button>
                </div>
                <div class="arr"></div>
                <div id="csdnBlogDir"></div>
            </div>
        </li>
        <!--        <li>-->
        <!--            <button class="left-fixed-btn btn-like tracking-ad" data-mod="popu_373" target="_self">-->
        <!--                <span class="iconbox border_red"><i class="icon iconfont icon-xihuan-"></i></span>-->
        <!--                <span class="txt">喜欢</span>-->
        <!--                <span class="untxt">取消喜欢</span>-->
        <!--            </button>-->
        <!--        </li>-->
        <li>
            <button class="left-fixed-btn csdn-tracking-statistics tracking-click" data-mod="popu_374"  id="com-quick-collect" target="_self" title="收藏">
                <a href="javascript:void(0);" class="iconbox border_purple" ><i class="icon iconfont icon-shoucang"></i></a>
            </button>
        </li>
        <li>
            <button class="left-fixed-btn btn-pinglun csdn-tracking-statistics tracking-click" data-mod="popu_544" title="评论">
                <a href="javascript:void(0);" class="iconbox border_purple" ><i class="icon iconfont icon-pinglun"></i></a>
            </button>
        </li>
        <li class="bdsharebuttonbox">
          <button class="outside left-fixed-btn csdn-tracking-statistics tracking-click" data-mod="popu_172" title="分享到新浪微博">
                <span class="iconbox border_red2"><i class="icon iconfont icon-xinlang"></i></span>
                <a href="#" class="bds_tsina" data-cmd="tsina" > </a>
          </button>
        </li>
        <li class="bdsharebuttonbox">
          <button class="outside left-fixed-btn csdn-tracking-statistics tracking-click" data-mod="popu_172" title="分享到微信">
              <span class="iconbox border_green"><i class="icon iconfont icon-weixin"></i></span>
              <a href="#" class="bds_weixin" data-cmd="weixin" > </a>
          </button>
        </li>
        <li class="bdsharebuttonbox">
          <button class="outside left-fixed-btn csdn-tracking-statistics tracking-click" data-mod="popu_172" title="分享到QQ空间">
              <span class="iconbox border_blue"><i class="icon iconfont icon-QQ"></i></span>
              <a href="#" class="bds_qzone" data-cmd="qzone" > </a>
          </button>
        </li>
        <li id="share_box">
            
            <div class="bdsharebuttonbox csdn-tracking-statistics tracking-click" data-mod="popu_172">
                
                
                
            </div>
        </li>
    </ul>
</div>
<div class="right_fixed">
    <div class="r_ico">
        <i class="icon iconfont icon-jubao"></i>
        <span class="txt" id="reportBtn">内容举报</span>
    </div>
    <div class="returnTop">
        <i class="icon iconfont icon-fanhuidingbu"></i>
        <span>返回顶部</span>
    </div>
</div>
<div id="pop_win"></div>
<div id="popup_mask"></div>
<div class="pop_CA_cover" ></div>
<div class="pop pop_CA" >
    <div class="CA_header">
        收藏助手
        <span class="cancel_icon"  id="fapancle" ></span>
    </div>
    <iframe src="" id="collectIframe" frameborder="0" width="100%" height="360"  scrolling="no" ></iframe>
</div>
<!--举报-->
<div id="report_dialog" style="top: 250px; left: 343.5px;"><div id="panel_report">
    <div class="panel_head">不良信息举报</div>
    <form method="post" id="frmReport" class="panel_body">
        <table border="0" cellpadding="0" cellspacing="4" class="pop_table">
            <tbody><tr><td colspan="2">您举报文章：<a href="http://blog.csdn.net/hbuxiaoshe/article/details/44780653" target="_blank">百度图片url解码</a></td></tr>
            <tr>
                <th style="width:60px;">举报原因：</th>
                <td id="panel_reporttype">
                    <label><input type="radio" class="report_type" id="report_sex" name="report_type" value="1">色情</label>
                    <label><input type="radio" class="report_type" id="report_Politics" name="report_type" value="2">政治</label>
                    <label><input type="radio" class="report_type" id="report_copy" name="report_type" value="3">抄袭</label>
                    <label><input type="radio" class="report_type" id="report_ad" name="report_type" value="4">广告</label>
                    <label><input type="radio" class="report_type" id="report_want" name="report_type" value="5">招聘</label>
                    <label><input type="radio" class="report_type" id="report_call" name="report_type" value="6">骂人</label>
                    <br>
                    <label><input type="radio" class="report_type" id="report_other" name="report_type" value="7">其他</label>
                    <input type="text" name="report_other_content" id="report_other_content" maxlength="30" style="display: none;">
                </td>
            </tr>
            <tr id="panel_originalurl" style="display: none;">
                <th>原文地址：</th>
                <td>
                    <input id="originalurl" value="http://" name="originalurl" type="text" style="width: 90%;">
                </td>
            </tr>
            <tr>
                <th id="sp_reason">原因补充：</th>
                <td>
                    <textarea id="report_description" style="width: 300px;" rows="3" name="report_description"></textarea>
                    <p id="sp_n" style="color:#999;margin:0px;padding:0px;">(最多只允许输入30个字)</p>
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <input id="btnSubmitReport" name="submit" type="image" align="middle" class="btn_1" src="http://csdnimg.cn/release/phoenix/images/btn_submit.jpg">
                    <span style="padding-left:20px;"></span>
                    <img id="btnCloseReportDialog" src="http://csdnimg.cn/release/phoenix/images/btn_cancel.jpg" align="middle">
                    <div id="error" style="color: Red">
                    </div>
                </td>
            </tr>
            </tbody></table>
    </form>
</div>
    <script language="javascript" type="text/javascript">
        var isComment=0;
        //显示隐藏地址
        $(function () {
          console.log("version:phoenix");
            if(isComment){
                $("#report_description").attr("disabled",true);
                $("#sp_n").hide();
                $("#sp_reason").html("评论内容：");
            }
            $(".report_type").click(function () {
                $("#panel_originalurl,#report_other_content").hide();
                switch ($(this).val()) {
                    case '3':
                        $("#panel_originalurl").show();
                        $("#originalurl").focus();
                        break;
                    case '7':
                        if(isComment){
                            $("#report_other_content").show().focus();
                        }
                        break;
                }

            });

            $("#frmReport").submit(function () {
                if (!currentUserName) {

                    if (confirm("您的操作必须登录，是否登录？")) {
                        location.href = "http://passport.csdn.net/account/login?from=" + encodeURIComponent(location.href);
                        return false;
                    }
                    return false;
                }

                var reportType = $("input[name=report_type]:checked").val();
                if(!reportType){
                    alert("请选择举报原因！");
                    return false;
                }
                var otherInfo = "";
                switch (reportType) {
                    case '3':
                        otherInfo = $("#originalurl").val();
                        if (otherInfo == ""||otherInfo=="http://") {
                            alert("举报抄袭必须提供原创文章地址！");
                            $("#originalurl").focus();
                            return false;
                        } else if(!checkeURL(otherInfo)) {
                            alert("请输入正确的原创文章地址！");
                            $("#originalurl").focus();
                            return false;
                        }
                        break;
                    case '7':
                        otherInfo = $("#report_other_content").val();
                        if (isComment && !otherInfo) {
                            alert("请填写举报的具体原因！");
                            $("#report_other_content").focus();
                            return false;
                        }
                        if(!isComment){
                            if(!$("#report_description").val()){
                                alert("请填写举报的具体原因！");
                                $("#report_description").focus();
                                return false;
                            }
                        }
                        break;
                }
                if(!isComment){
                    if($("#report_description").val().length>30){
                        alert("举报原因最多只允许输入30个字！");
                        return false;
                    }
                }
	            nowTime = {
		            year: new Date().getFullYear(),
		            month: parseInt(new Date().getMonth())+1,
		            day: new Date().getDate(),
		            hours: parseInt(new Date().getHours())+1,
		            minutes: parseInt(new Date().getMinutes())+1,
		            seconds: parseInt(new Date().getSeconds())+1
	            };
	            var data = {
		            articleId: fileName,
		            commentId: 0,
		            reportType: reportType,
		            originalurl: $("#originalurl").val(),
		            report_other_content: $("#report_other_content").val(),
		            report_description: $("#report_description").val(),
		            currentUserName: currentUserName,
		            updatetime: nowTime.year+'/'+nowTime.month+'/'+nowTime.day+' '+ nowTime.hours+':'+nowTime.minutes+':'+seconds,
		            blogUser: username
	            };
	            if(!isComment){//如果是举报文章
		            data.report_other_content = data.report_description;
		            // data.report_description = "1. 神经网络这是一个常见的神经网络的图：这是一个常见的三层神经网络的基本构成，Layer L1是输入层，Layer L2是隐含层";
	            }

	            $.post(blog_address + "/common/report?id="+fileName+"&t=2", data, function (data) {
		            if (data.result == 1){
			            SetError("感谢您的举报，我们会尽快审核！");
		            }else{
			            if (data.content) alert(data.content);
		            }

	            });
                return false;
            });

            $("#btnCloseReportDialog").click(function () {
                CloseDiv();
            });

        });

        //提示后关闭方法
        function SetError(error) {
            $("#btnCloseReportDialog").trigger("click");
            alert(error);
            CloseDiv();
        }

        //关闭方法
        function CloseDiv() {

            $.removeMask();
            $("#report_dialog").hide();
            return false;
        }

        //验证url
        function checkeURL(url){
            return /^http(s)?:\/\/([\w-]+\.)+[\w-]+/i.test(url);
        }
    </script>
</div>
<!--  fixme 后期清理掉  -->
<div id="a52b5334d" style="width: 1px; height: 1px; display: none;">
    <script id="adJs52b5334"></script>
    <script>document.getElementById("adJs52b5334").src = "http://ads.csdn.net/js/opt/52b5334.js?t=" + Math.random();</script>
</div>
<!-- <script type="text/javascript" src="http://passport.csdn.net/content/loginbox/login.js"></script> -->
<script>window._bd_share_config = { "common": { "bdSnsKey": {}, "bdText": "", "bdMini": "1", "bdMiniList": false, "bdPic": "", "bdStyle": "0", "bdSize": "16" }, "share": {} }; with (document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5)];</script>
<script type="text/javascript" >
    if($(".article_collect li").length==1){$(".article_collect").hide();}
    if($(".article_tags li").length==1){$(".article_tags").hide();}
    $(".edit a").attr("href","http://mp.blog.csdn.net/postedit/"+fileName);
    $.each($(".edu_li a"),function(){$(this).attr("href",$(this).attr("href").replace("blog7","blog9"))});
    new CNick('#uid').showNickname();

    if($("#fan").html()=="")
    {
	    $("#fan").html(0);
    }
</script>
<script src="http://c.csdnimg.cn/public/common/append_mark/appendMark.min.js?v=5.00.43" type="text/javascript"></script>
<script type="text/javascript">
    appendMark($('.recommend_list').children('a').find('dt'),$('.extension_other'),$('.yd_a_d_feed_cla'))
</script>
<div class=""id="loginWrap"></div>
<div class="" id="dlMask"></div>
</body>
